package com.lyn.pluginhost.service

import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.util.Log
import com.lyn.pluginhost.service.binder.PluginHostBinder

/**
 * 插件宿主服务
 * @author longyn 2025/07/10
 * @version 1.0.0
 */
class PluginHostService : Service() {

    companion object{
        const val  TAG = "PluginHostService"
    }

    private lateinit var pluginHostBinder: PluginHostBinder

    override fun onBind(intent: Intent?): IBinder {
        Log.d(TAG,"onBind")
        return pluginHostBinder
    }

    override fun onCreate() {
        super.onCreate()
        pluginHostBinder = PluginHostBinder(application)
        Log.d(TAG,"onCreate")
    }


    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        Log.d(TAG,"onStartCommand")
        return super.onStartCommand(intent, flags, startId)
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.d(TAG,"onDestroy")
    }
}